import request from '@/utils/request'


export default () => ({

  //项目列表
  PROJECT_MANAGER_PROJECT_LIST:function (data) {
    return request({
      url: `/project-start/project/list`,
      method: 'post',
      data
    })
  },

  //进行中项目列表
  PROJECT_MANAGER_PROJECT_LIST_DOING:function () {
    return request({
      url: `/project-start/project/list`,
      method: 'get',
    })
  },

  //项目创建
  PROJECT_MANAGER_PROJECT_CREATE:function (data) {
    return request({
      url: `/project-start/project/create`,
      method: 'post',
      data
    })
  },

  //临床阶段项目创建
  PROJECT_MANAGER_PROJECT_CREATE_STAGE:function (data) {
    return request({
      url: `/project-start/project/create2`,
      method: 'post',
      data
    })
  },

  //项目暂停/终止
  PROJECT_START_PROJECT_STOP_CREATE:function (data) {
    return request({
      url: `/project-start/stop/create`,
      method: 'post',
      data
    })
  },

  //项目详情
  PROJECT_MANAGER_PROJECT_DETAIL:function (id) {
    return request({
      url: `/project-start/project/detail?id=${id}`,
      method: 'get',
    })
  },

  //删除项目
  PROJECT_MANAGER_PROJECT_DELETE:function (id) {
    return request({
      url: `/project-start/project/delete?id=${id}`,
      method: 'delete',
    })
  },

  //更新项目方案书
  PROJECT_START_PROJECT_UPDATE_BOOK:function (id,data) {
    return request({
      url: `/project-start/project/update-book?id=${id}`,
      method: 'put',
      data
    })
  },

  //编辑项目
  PROJECT_MANAGER_PROJECT_UPDATA:function (id,data) {
    return request({
      url: `/project-start/project/update?id=${id}`,
      method: 'put',
      data
    })
  },

  //提交项目验收
  PROJECT_MANAGER_PROJECT_END_CHECK:function (id,data) {
    return request({
      url: `/project-start/project/update-end-check?id=${id}`,
      method: 'put',
      data
    })
  },

  //提交项目结题
  PROJECT_MANAGER_PROJECT_END_CHECK2:function (id,data) {
    return request({
      url: `/project-start/project/update-end2-check?id=${id}`,
      method: 'put',
      data
    })
  },

  //提交审批
  PROJECT_MANAGER_PROJECT_STATUS:function (id,status) {
    return request({
      url: `/project-start/project/status?id=${id}&status=${status}`,
      method: 'put',
    })
  },

  //任务列表
  PROJECT_START_TASK_LIST:function (data) {
    return request({
      url: `/project-start/task/self/list`,
      method: 'post',
      data
    })
  },

  //任务详情
  PROJECT_START_TASK_DETAIL:function (id) {
    return request({
      url: `/project-start/task/detail?id=${id}`,
      method: 'get',
    })
  },

  //修改任务状态
  PROJECT_START_TASK_STATUS:function (data) {
    return request({
      url: `/project-start/task/update-status`,
      method: 'put',
      data
    })
  },

  //获取同意立项的列表
  PROJECT_INIT_AGREE_LIST:function () {
    return request({
      url: `/project-init/check/agree/list`,
      method: 'get',
    })
  },

  //获取同意立项的详情
  PROJECT_INIT_AGREE_DETAIL:function (id) {
    return request({
      url: `/project-init/check/detail?id=${id}`,
      method: 'get',
    })
  },

  //获取工作计划列表
  PROJECT_WORK_PLAN_LIST:function (data) {
    return request({
      url: `/project-start/work_plan/list`,
      method: 'post',
      data
    })
  },

  //创建工作计划
  PROJECT_WORK_PLAN_CREATE:function (data) {
    return request({
      url: `/project-start/work_plan/create`,
      method: 'post',
      data
    })
  },
  //删除工作计划
  PROJECT_WORK_PLAN_DELETE:function (id) {
    return request({
      url: `/project-start/work_plan/delete?id=${id}`,
      method: 'delete',
    })
  },
  //修改工作计划
  PROJECT_WORK_PLAN_STATUS:function (id,status,data) {
    return request({
      url: `/project-start/work_plan/update-status?id=${id}&status=${status}`,
      method: 'put',
      data
    })
  },

  //获取工作计划详情
  PROJECT_WORK_PLAN_DETAIL:function (id) {
    return request({
      url: `/project-start/work_plan/detail?id=${id}`,
      method: 'get',
    })
  },

  //项目问题列表
  PROJECT_WORK_PROBLEM_LIST:function (data) {
    return request({
      url: `/project-start/problem/list`,
      method: 'post',
      data
    })
  },

  //创建项目问题
  PROJECT_WORK_PROBLEM_CREATE:function (data) {
    return request({
      url: `/project-start/problem/create`,
      method: 'post',
      data
    })
  },

  //删除项目问题
  PROJECT_WORK_PROBLEM_DELETE:function (id) {
    return request({
      url: `/project-start/problem/delete?id=${id}`,
      method: 'delete',
    })
  },

  //获取项目问题详情
  PROJECT_WORK_PROBLEM_DETAIL:function (id) {
    return request({
      url: `/project-start/problem/detail?id=${id}`,
      method: 'get',
    })
  },

  //更新项目问题
  PROJECT_WORK_PROBLEM_UPDATE:function (id,status,data) {
    return request({
      url: `/project-start/problem/update?id=${id}&status=${status}`,
      method: 'put',
      data
    })
  },

  //项目操作记录列表
  PROJECT_WORK_OPERATION_LIST:function (id,data) {
    return request({
      url: `/project-start/project/history/list?id=${id}`,
      method: 'post',
      data
    })
  },

  //获取项目事务列表
  PROJECT_WORK_TRANSACTION_LIST:function (data) {
    return request({
      url: `/project-start/transaction/list`,
      method: 'post',
      data
    })
  },

  //变更列表
  PROJECT_WORK_CHANGE_LIST:function (data) {
    return request({
      url: `/project-start/change/list`,
      method: 'post',
      data
    })
  },

  //变更申请列表
  PROJECT_WORK_APPLY_LIST:function (data) {
    return request({
      url: `/project-start/change_apply/list`,
      method: 'post',
      data
    })
  },

  //创建变更申请
  PROJECT_WORK_APPLY_CREATE:function (data) {
    return request({
      url: `/project-start/change_apply/create`,
      method: 'post',
      data
    })
  },

  //修改变更申请
  PROJECT_WORK_APPLY_UPDATE:function (data) {
    return request({
      url: `/project-start/change_apply/update`,
      method: 'put',
      data
    })
  },

  //阶段性评审列表
  PROJECT_WORK_REVIEW_LIST:function (id) {
    return request({
      url: `/project-start/review/list?project_id=${id}`,
      method: 'post',
    })
  },

  //获取字典类型
  PROJECT_SYS_DICT_LIST:function (data) {
    return request({
      url: `/sys/dict/list`,
      method: 'post',
      data
    })
  },

  //获取全部字典类型
  PROJECT_SYS_ALLDICT_LIST:function () {
    return request({
      url: `/sys/dict/type-dict`,
      method: 'get',
    })
  },

  // 更新任务文件
  PROJECT_WORK_TASK_UPDATEFILE:function(data) {
    return request({
      url: "/project-start/task/update-file",
      method: "put",
      data
    });
  },

  // 用户管理列表
  GET_USER_LIST:function(data) {
    return request({
      url: "/sys/user/list",
      method: "post",
      data
    });
  },

  // 暂停/停止详情
  PROJECT_START_STOP_DETAIL:function(id) {
    return request({
      url: `/project-start/project/stop/detail?project_id=${id}`,
      method: "get",
    });
  },

  // 项目变更申请
  PROJECT_START_CHANGE_CREATE:function(data) {
    return request({
      url: "/project-start/change/create",
      method: "post",
      data
    });
  },

  // 通用会议列表
  PROJECT_START_MEETING_LIST:function(data) {
    return request({
      url: "/project-start/transaction/meeting/list",
      method: "post",
      data
    });
  },

  // 项目会议列表
  PROJECT_START_PROJECT_MEETING_LIST:function(data) {
    return request({
      url: "/project-start/transaction/project/meeting/list",
      method: "post",
      data
    });
  },

  // 创建基线
  PROJECT_START_BASELINE_CREATE:function(id) {
    return request({
      url: `/project-start/project/baseline/create?project_id=${id}`,
      method: "post",
    });
  },

  // 创建基线
  PROJECT_START_BASELINE_LIST:function(id) {
    return request({
      url: `/project-start/project/baseline/list?project_id=${id}`,
      method: "post",
    });
  },

  //项目信息变更flag
  PROJECT_START_CHANGE_FLAG:function(id) {
    return request({
      url: `/project-start/change/flag?id=${id}`,
      method: "get",
    });
  },

  //任务项目视图
  PROJECT_START_TASK_PROJECT_TREE:function(data) {
    return request({
      url: `/project-start/task/project/tree/all`,
      method: "post",
      data
    });
  },

  //任务项目视图-项目
  PROJECT_START_PROJECT_LIST_ONGOING:function() {
    return request({
      url: `/project-start/task/all/project`,
      method: "get",
    });
  },

  //全部项目
  PROJECT_START_PROJECT_ALL:function() {
    return request({
      url: `project-start/project/all`,
      method: "get",
    });
  },

  //任务项目视图-项目
  USER_GROUP_DEPARTMENT_LIST:function() {
    return request({
      url: `/sys/user/group-by-department/list`,
      method: "get",
    });
  },

  //任务项目视图-项目
  TASK_CAL_LINE:function(data) {
    return request({
      url: `/project-start/task/cal/line`,
      method: "post",
      data
    });
  },

  //任务项目视图-项目
  SYS_DEPARTMENT_USER:function() {
    return request({
      url: `/sys/department/users`,
      method: "get",
    });
  },


  //项目问题 -- 人员列表
  PROJECT_START_PROBLEM_USER_LIST:function(type) {
    return request({
      url: `/project-start/problem/user/list?user_type=${type}`,
      method: "get",
    });
  },

  //项目问题 -- 项目列表
  PROJECT_START_PROBLEM_PROJECT_LIST:function() {
    return request({
      url: `/project-start/problem/project/list`,
      method: "get",
    });
  },

  //项目任务统计数据
  PROJECT_START_TASK_REPORT:function() {
    return request({
      url: `/project-start/task/report`,
      method: "get",
    });
  },

  //获取临床前项目列表
  PROJECT_START_PROJECT_BEFORE_LIST:function() {
    return request({
      url: `/project-start/project/before-list`,
      method: "get",
    });
  },

  //获取临床前项目列表
  PROJECT_QUALITY_STANDARD_ISVERSION:function(no,version) {
    return request({
      url: `/quality/standard/isVersion?no=${no}&version=${version}`,
      method: "get",
    });
  },


})
